/*
 * @Author: tangchuan 1944302118@qq.com
 * @Date: 2024-03-27 11:37:35
 * @LastEditors: tangchuan 1944302118@qq.com
 * @LastEditTime: 2024-04-17 11:33:59
 * @FilePath: \jeecg-novel\src\views\member\giftRecord\UserMemberGiftRecord.data.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '赠送日期',
    align: 'center',
    dataIndex: 'createTime',
  },
  {
    title: '会员用户名',
    align: 'center',
    dataIndex: 'userName',
  },
  {
    title: '会员邮箱',
    align: 'center',
    dataIndex: 'email',
  },
  {
    title: '赠送时长',
    align: 'center',
    dataIndex: 'giftDuration',
  },
  {
    title: '会员到期时间',
    align: 'center',
    dataIndex: 'memberExpireTime',
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '赠送日期',
    field: 'giftTime',
    component: 'RangePicker',
    componentProps: {
      showTime: true,
    },
    colProps: { span: 6 },
  },
  {
    label: '会员用户名',
    field: 'userName',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: '会员邮箱',
    field: 'userEmail',
    component: 'Input',
    colProps: { span: 6 },
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
